<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateHotroomsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('hotrooms', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('hotel_id')->comment('酒店id');
            $table->string('title')->comment('标题')->nullable();
            $table->string('coverimage')->comment('封面图片')->nullable();
            $table->integer('price')->default(0)->comment('房价')->nullable();
            $table->string('introduction')->comment('客房描述')->nullable();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('hotrooms');
    }
}
